package com.ruoyi.loan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.ruoyi.loan.dto.SelectReturnLoanListDto;
import com.ruoyi.loan.entity.ReturnLoanRecord;

import java.util.List;

/**
 * @Author lin
 * @Date 2022/4/11 19:02
 */
public interface ReturnLoanService extends IService<ReturnLoanRecord> {

    /**
     * 分页获取还款信息
     * @param dto 参数
     * @return 还款信息
     */
    PageInfo getReturnLoanList(SelectReturnLoanListDto dto);

    /**
     * 根据贷款记录id进行还款
     * @param loanId
     * @param money
     */
    void repayment(Integer loanId, int money);

    List<ReturnLoanRecord> getLoanReturnRecords(Integer loanId);
}
